package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppUserFeedbackMapper;
import com.ruoyi.system.domain.AppUserFeedback;
import com.ruoyi.system.service.IAppUserFeedbackService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-15
 */
@Service
public class AppUserFeedbackServiceImpl implements IAppUserFeedbackService 
{
    @Autowired
    private AppUserFeedbackMapper appUserFeedbackMapper;

    /**
     * 查询用户反馈
     * 
     * @param id 用户反馈ID
     * @return 用户反馈
     */
    @Override
    public AppUserFeedback selectAppUserFeedbackById(Long id)
    {
        return appUserFeedbackMapper.selectAppUserFeedbackById(id);
    }

    /**
     * 查询用户反馈列表
     * 
     * @param appUserFeedback 用户反馈
     * @return 用户反馈
     */
    @Override
    public List<AppUserFeedback> selectAppUserFeedbackList(AppUserFeedback appUserFeedback)
    {
        return appUserFeedbackMapper.selectAppUserFeedbackList(appUserFeedback);
    }

    /**
     * 新增用户反馈
     * 
     * @param appUserFeedback 用户反馈
     * @return 结果
     */
    @Override
    public int insertAppUserFeedback(AppUserFeedback appUserFeedback)
    {
        appUserFeedback.setCreateTime(DateUtils.getNowDate());
        return appUserFeedbackMapper.insertAppUserFeedback(appUserFeedback);
    }

    /**
     * 修改用户反馈
     * 
     * @param appUserFeedback 用户反馈
     * @return 结果
     */
    @Override
    public int updateAppUserFeedback(AppUserFeedback appUserFeedback)
    {
        appUserFeedback.setUpdateTime(DateUtils.getNowDate());
        return appUserFeedbackMapper.updateAppUserFeedback(appUserFeedback);
    }

    /**
     * 删除用户反馈对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAppUserFeedbackByIds(String ids)
    {
        return appUserFeedbackMapper.deleteAppUserFeedbackByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户反馈信息
     * 
     * @param id 用户反馈ID
     * @return 结果
     */
    @Override
    public int deleteAppUserFeedbackById(Long id)
    {
        return appUserFeedbackMapper.deleteAppUserFeedbackById(id);
    }
}
